package lambda;

import java.io.File;
import java.io.FileFilter;

public class LambdaDemo {
    public static void main(String[] args) {
        /*FileFilter filter = new FileFilter() {
            @Override
            public boolean accept(File file) {
                return file.getName().contains("t");
            }
        };

        FileFilter filter1 = (File file) -> {
                return file.getName().contains("t");
        };

        FileFilter filter2 = (file) ->{
            return file.getName().contains("t");
        };

        FileFilter filter3 = (file) -> file.getName().contains("t");

        FileFilter filter4 = f -> f.getName().contains("t");*/

        /*File dir = new File("./src/file");
        File[] subs = dir.listFiles(new FileFilter() {
            @Override
            public boolean accept(File file) {
                return file.getName().contains("t");
            }
        });*/

        File dir = new File("./src/file");
        File[] subs = dir.listFiles(f->f.getName().contains("t"));



    }
}
